package com.famnote.randomchat;


import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.view.Menu;


public class WebViewActivity extends Activity{
     
    private WebView mWebView;
     
 
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web_view);
         
        mWebView = (WebView) findViewById(R.id.webview);
         
        mWebView.getSettings().setJavaScriptEnabled(true); 
        //mWebView.loadUrl("http://push.appaas.com/directory/www");
        mWebView.loadUrl("http://blog.naver.com/famnote");
        mWebView.setWebViewClient(new WebViewClientClass());  
        
        setTitle("FAMNOTE BLOG");
    }
     
    /*
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) { 
        if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) { 
            mWebView.goBack(); 
            return true; 
        } 
        return super.onKeyDown(keyCode, event);
    }
    */
     
    private class WebViewClientClass extends WebViewClient { 
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) { 
            view.loadUrl(url); 
            return true; 
        } 
    }
     
}
